Fix file reduction campaign by removing oneOf from update_project schema #8113
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Investigated and fixed workflow run #20579463931 which failed on Dec 29 after 12 consecutive successful runs. The failure occurred in the "Execute GitHub Copilot CLI" step of the agent job.
Root Cause
The 400 Bad Request error was caused by a
oneOfJSON Schema constraint in theupdate_projecttool schema that was inadvertently introduced in PR #8106. The Copilot CLI API does not support theoneOfkeyword and returns a 400 Bad Request when encountering it in tool schemas.Fix Applied
Removed the
oneOfconstraint frompkg/workflow/js/safe_outputs_tools.jsonand simplified the schema to use basic required fields:Before:
{ "inputSchema": { "type": "object", "properties": { ... }, "oneOf": [ { "required": ["project", "content_type", "content_number"], "properties": { "content_type": { "enum": ["issue", "pull_request"] } } }, { "required": ["project", "content_type", "draft_title"], "properties": { "content_type": { "const": "draft_issue" } } } ] } }After:
{ "inputSchema": { "type": "object", "required": ["project", "content_type"], "properties": { ... }, "additionalProperties": false } }The conditional requirements (content_number vs draft_title based on content_type) are now handled by runtime validation in the JavaScript action scripts rather than JSON Schema validation.
Changes Made
oneOfconstraint and added simplerequired: ["project", "content_type"]Impact
update_projecttool schema is now compatible with Copilot CLI APIOriginal prompt
💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.